package managers — Home

Package Managers

Parent Note (Up)
Next Note

Introduction

Package managers are the tools that make it easier for us to:
- Install any software that we need
- Update all software and the files that they're dependent on
- Do all of that for free

There are 2 important package managers that we'll be using in the context of a macbook. The first one is homebrew, which will act as the base of all of the big software and applications that we install.

To understand a little more about what homebrew does and why it's useful:
- how to get and use the ultimate package manager

Before I install homebrew, I need to set up my mac as follows:
- brew installation
Essentially, I need to install CLT for Xcode through the following steps:
- Open terminal, by typing "terminal" into spotlight and selecting

xcode-select --install

Then homebrew can be installed by typing the following command (replace shreyasharish with your system's user name) into the terminal:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/shreyasharish/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

- At any point I can clarify syntax by typing and running "brew help" in the terminal
- To update homebrew, type and run "brew update" in the terminal
- To check homebrew version, type and run "brew -v" in the terminal
- To ensure that homebrew is working well, type and run "brew doctor" in the terminal


Aside from homebrew, the other package manager that we will use extensively is pip. Pip will come installed with recent versions of python, and will be used predominantly to install python packages, not really software outside of python. More on pip, when we get into python.
At this stage it would still help to understand what the differences are between homebrew and pip, and why both of these are needed. The below article is a useful start for the same:
- hobebrew vs pip (differences)

One of the alternatives to homebrew is Conda. But for a range of reasons, we prefer homebrew:
- hobebrew vs conda

End of Note

Notes mentioning this note